window.addEvent('load',function()
{
    //斑马表
    var list=new ZebraTable(document.getElementById('List'));
    {
        list.Color_1='#ffffff';
        list.Color_2='#f6f6f6';
        list.Color_3='#ebeff9';
        list.Render('tbody');
    }
    list=null;

    //全选
    $$('#SelectAll').addEvent('click',function(){
        Checkbox.SelectAll('ID');
    });

    //全不选
    $$('#UnSelectAll').addEvent('click',function(){
        Checkbox.UnSelectAll('ID');
    });

    //删除
    $$('#Delete').addEvent('click',function()
    {
        if(Checkbox.IsChecked('ID'))
        {
            mconfirm
            (
                '你确认要删除吗？',
                function()
                {
                    $('Form1').submit();
                },
                function()
                {

                }
            );
        }
        else
        {
            malert('请选择要删除的信息');
        }
    });
       $$('#IsTop').addEvent('click',function()
    {
        if(Checkbox.IsChecked('ID'))
        {
            mconfirm
            (
                '你确认要置顶吗？',
                function()
                {
			  $('Form1').action='list.action.batch_istop.php';
                    $('Form1').submit();
                },
                function()
                {

                }
            );
        }
        else
        {
            malert('请选择要置顶的信息');
        }
    });
});